<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[rules]" />
    <!--组名-->
    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <!--权限说明-->
    <div class="form-group">
        <label for="c-permission_description" class="control-label col-xs-12 col-sm-2">{:__('permission_description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-permission_description" class="form-control" name="row[permission_description]" type="text" value="">
        </div>
    </div>
    <!--是否收费-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('is_charge')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_charge]', ['1'=>__('Yes'), '0'=>__('No')],0)}
        </div>
    </div>
    <!--会员价格-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('membership_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_price" class="form-control" name="row[membership_price]" type="number" step="any" min="0" data-rule="required;range(0~)" value="0">
        </div>
    </div>
    <!--是否为注册时默认角色-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('is_default_role')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_default_role]', ['1'=>__('Yes'), '0'=>__('No')],0)}
        </div>
    </div>
    <!--会员有效期(天)-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('membership_expiry')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_expiry" class="form-control" name="row[membership_expiry]" type="number" step="1" min="0" data-rule="required;digits;integer;range(0~)" value="0">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Permission')}:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="text-muted"><input type="checkbox" name="" id="checkall" /> <label for="checkall"><small>{:__('Check all')}</small></label></span>
            <span class="text-muted"><input type="checkbox" name="" id="expandall" /> <label for="expandall"><small>{:__('Expand all')}</small></label></span>

            <div id="treeview"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    var nodeData = {:json_encode($nodeList); };
</script>
